package com.example.test.advice.第六章_枚举和注解.建议88_用枚举实现工厂方法模式更简洁;

public class Client {

    public static void main(String[] args) {

    }

    //传统工厂方法
    public static void test(){
        //生产车辆
        Car car = CarFactory.createCar(FordCar.class);
    }

    //枚举方法生产起草
    public static void testEnum(){
        Car car = CarEnumFactory.FordCar.create();
    }

    //通过抽象方法生产产品
    public static void testEnum2(){
        Car car = CarAbstractFactory.FordCar.create();
    }
}
